]> dgit.raspbian.org Git - gnome-shell.git/commit
dnd: Skip drag target when its acceptDrop() throws an exception
authorPhilip Chimento <philip@endlessm.com>
Wed, 23 Oct 2019 00:48:00 +0000 (17:48 -0700)
committerPhilip Chimento <philip@endlessm.com>
Wed, 23 Oct 2019 01:08:10 +0000 (18:08 -0700)
commit055c007ac26b6475cc2821dbfc2e760ec4f3a9a6
tree7d2a08bf6ee5d5af629233a312cfcaa680f3479e
parent43cf466d09ca84e8f3f8384bd9154b119cf701bc
dnd: Skip drag target when its acceptDrop() throws an exception

In the case of bugs in a drag target's acceptDrop() function, it may
throw an exception. In the previous code, this would break out of the
loop entirely and never cancel the drag, so the mouse button release
event would be ignored and you would have to press Esc to get out of the
drag.

In this change, if acceptDrop() throws an exception, we log it and move
on to the next parent target instead.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/777
js/ui/dnd.js